<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Mall - 登录</title>
    <link type="text/css" rel="stylesheet" href="../assets/css/bootstrap.min.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/fontawesome-all.min.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/animate.min.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/magnific-popup.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/nice-select.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/pe-icon-7-stroke.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/slick.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/ui-range-slider.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/meanmenu.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/swipper.css"/>
    <link type="text/css" rel="stylesheet" href="../assets/css/main.css"/>
</head>

<body>
<div class="header-area bg-black-2 d-none d-lg-block">
    <div class="header-top-2">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-xxl-3 col-lg-3">
                    <div class="header-left-2">
                        <div class="logo-2">
                            <a href="${pageContext.request.contextPath}/index"><img
                                    src="../assets/img/logo/logo-white.png"></a>
                        </div>
                    </div>
                </div>
                <div class="col-xxl-9 col-lg-9">
                    <div class="header-right-2 text-end">
                        <div class="epix-header-list-2 d-inline-block">
                            <ul>
                                <li>
                                    <c:choose>
                                        <c:when test="${sessionScope.username!=null}">
                                            <a style="color: white">欢迎您：${sessionScope.username}</a>
                                            <span style="color: white">/</span>
                                            <a href="${pageContext.request.contextPath}/logout" id="logout"> 注销</a>
                                        </c:when>
                                        <c:when test="${sessionScope.username==null}">
                                            <a href="${pageContext.request.contextPath}/login">登录</a>
                                            <span style="color: white">/</span>
                                            <a href="${pageContext.request.contextPath}/register"> 注册</a>
                                        </c:when>
                                    </c:choose>
                                </li>
                                <li><a href="${pageContext.request.contextPath}/cart">购物车</a></li>
                                <li><a href="${pageContext.request.contextPath}/order-list">历史订单</a></li>
                                <c:if test="${sessionScope.isAdmin==true}">
                                    <li><a href="${pageContext.request.contextPath}/goodsAll.jsp">后台</a></li>
                                </c:if>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<main>
    <div id="loading">
        <div id="loading-center">
            <div id="loading-center-absolute">
                <div class="object" id="first_object"></div>
                <div class="object" id="second_object"></div>
                <div class="object" id="third_object"></div>
            </div>
        </div>
    </div>
    <section class="login-area pt-100 pb-100">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 offset-lg-2">
                    <div class="basic-login">
                        <h3 class="text-center mb-60"> 登 录</h3>
                        <form action="${pageContext.request.contextPath}/login" method="post">
                            <label for="nick-name"><strong style="font-size: 20px;">昵称：</strong></label>
                            <input id="nick-name" name="nick-name" type="text" required
                                   <c:if test="${requestScope.user.username!=null}">value="${requestScope.user.username}" </c:if> />
                            <label for="password"><strong style="font-size: 20px;">密码：</strong></label>
                            <input id="password" name="password" type="password" required
                                   <c:if test="${requestScope.user.password!=null}">value="${requestScope.user.password}" </c:if> />
                            <button type="submit" class="os-btn w-100"> 立 即 登 录</button>
                            <div class="or-divide"><span>or</span></div>
                            <a href="${pageContext.request.contextPath}/register" class="os-btn os-btn-black w-100">没有账号？点击注册</a>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>
</main>
<div class="footer-copyright-2" style="position: fixed;bottom: 0;width: 100%;">
    <div class="container">
        <div class="row">
            <div class="col-xxl-9 col-xl-6 col-lg-6">
                <p>Copyrights © 2021 EPIXX. All Rights Reserved.</p>
            </div>
        </div>
    </div>
</div>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/bootstrap.bundle.min.js"></script>
<script src="../assets/js/isotope.pkgd.min.js"></script>
<script src="../assets/js/slick.min.js"></script>
<script src="../assets/js/swipper-bundle.min.js"></script>
<script src="../assets/js/jquery.meanmenu.min.js"></script>
<script src="../assets/js/wow.min.js"></script>
<script src="../assets/js/wow.min.js"></script>
<script src="../assets/js/jquery.elevatezoom.js"></script>
<script src="../assets/js/nice-select.js"></script>
<script src="../assets/js/jquery.scrollUp.min.js"></script>
<script src="../assets/js/jquery-ui-slider-range.js"></script>
<script src="../assets/js/countdown.min.js"></script>
<script src="../assets/js/jquery.magnific-popup.min.js"></script>
<script src="../assets/js/imagesloaded.pkgd.min.js"></script>
<script src="../assets/js/mouse-wheel.min.js"></script>
<script src="../assets/js/main.js"></script>
</body>
</html>